package hollycrm.com.libuip.socket;


/**
 * Created by aber on 2017/1/17.
 * represent a UIP socket connect by which we send message
 * and receive message
 */
public interface SocketClient {

    interface Callback {

        void onSend(String message);

        void onReceived(String incomingMessage);

        void onConnected();

        void onConnecting();

        void onDisconnected();

        void onError(Throwable e);
    }

    void send(String message);

    void sendHeart(String message);

    void setCallback(Callback callback);

    void disconnect();

    void connect();

    boolean isRunning();

    void setHeartMessage(String message);
}
